-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properly handle emojis as literal prefix in macros #123752
Conversation
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
This can safely ride the train, but proposing for beta backport to expedite the fix landing on stable. This is an old stable-to-stable regression. Reminds me of the time we accepted any random identifier as a literal prefix with no error whatsoever 😬 |
Just in case @bors try @craterbot check |
🚨 Error: missing start toolchain 🆘 If you have any trouble with Crater please ping |
@bors try |
Properly handle emojis as literal prefix in macros Do not accept the following ```rust macro_rules! lexes {($($_:tt)*) => {}} lexes!(🐛"foo"); ``` Before, invalid emoji identifiers were gated during parsing instead of lexing in all cases, but this didn't account for macro expansion of literal prefixes. Fix rust-lang#123696.
This comment has been minimized.
This comment has been minimized.
rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer |
This comment has been minimized.
This comment has been minimized.
Do not accept the following ```rust macro_rules! lexes {($($_:tt)*) => {}} lexes!(🐛"foo"); ``` Before, invalid emoji identifiers were gated during parsing instead of lexing in all cases, but this didn't account for macro expansion of literal prefixes. Fix rust-lang#123696.
@bors try |
Properly handle emojis as literal prefix in macros Do not accept the following ```rust macro_rules! lexes {($($_:tt)*) => {}} lexes!(🐛"foo"); ``` Before, invalid emoji identifiers were gated during parsing instead of lexing in all cases, but this didn't account for macro pre-expansion of literal prefixes. Fix rust-lang#123696.
☀️ Try build successful - checks-actions |
@craterbot check |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me, let's see what crater says...
Beta backport declined as per compiler team on Zulip. As pointed out in this comment, it can ride the trains and reach stable on its legs 🚶 @rustbot label -beta-nominated |
🎉 Experiment
|
I'm glad to see that no-one has been naughty with this oversight. |
@bors r+ |
Properly handle emojis as literal prefix in macros Do not accept the following ```rust macro_rules! lexes {($($_:tt)*) => {}} lexes!(🐛"foo"); ``` Before, invalid emoji identifiers were gated during parsing instead of lexing in all cases, but this didn't account for macro pre-expansion of literal prefixes. Fix rust-lang#123696.
Properly handle emojis as literal prefix in macros Do not accept the following ```rust macro_rules! lexes {($($_:tt)*) => {}} lexes!(🐛"foo"); ``` Before, invalid emoji identifiers were gated during parsing instead of lexing in all cases, but this didn't account for macro pre-expansion of literal prefixes. Fix rust-lang#123696.
Properly handle emojis as literal prefix in macros Do not accept the following ```rust macro_rules! lexes {($($_:tt)*) => {}} lexes!(🐛"foo"); ``` Before, invalid emoji identifiers were gated during parsing instead of lexing in all cases, but this didn't account for macro pre-expansion of literal prefixes. Fix rust-lang#123696.
…kingjubilee Rollup of 6 pull requests Successful merges: - rust-lang#117919 (Introduce perma-unstable `wasm-c-abi` flag) - rust-lang#123571 (Correctly change type when adding adjustments on top of `NeverToAny`) - rust-lang#123752 (Properly handle emojis as literal prefix in macros) - rust-lang#123980 ( Add an opt-in to store incoming edges in `VecGraph` + misc) - rust-lang#124110 (Fix negating `f16` and `f128` constants) - rust-lang#124116 (when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation) r? `@ghost` `@rustbot` modify labels: rollup
Properly handle emojis as literal prefix in macros Do not accept the following ```rust macro_rules! lexes {($($_:tt)*) => {}} lexes!(🐛"foo"); ``` Before, invalid emoji identifiers were gated during parsing instead of lexing in all cases, but this didn't account for macro pre-expansion of literal prefixes. Fix rust-lang#123696.
…kingjubilee Rollup of 9 pull requests Successful merges: - rust-lang#117919 (Introduce perma-unstable `wasm-c-abi` flag) - rust-lang#123406 (Force exhaustion in iter::ArrayChunks::into_remainder) - rust-lang#123752 (Properly handle emojis as literal prefix in macros) - rust-lang#123935 (Don't inline integer literals when they overflow - new attempt) - rust-lang#123980 ( Add an opt-in to store incoming edges in `VecGraph` + misc) - rust-lang#124019 (Use raw-dylib for Windows synchronization functions) - rust-lang#124110 (Fix negating `f16` and `f128` constants) - rust-lang#124112 (Fix ICE when there is a non-Unicode entry in the incremental crate directory) - rust-lang#124116 (when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation) r? `@ghost` `@rustbot` modify labels: rollup
…kingjubilee Rollup of 7 pull requests Successful merges: - rust-lang#123406 (Force exhaustion in iter::ArrayChunks::into_remainder) - rust-lang#123752 (Properly handle emojis as literal prefix in macros) - rust-lang#123935 (Don't inline integer literals when they overflow - new attempt) - rust-lang#123980 ( Add an opt-in to store incoming edges in `VecGraph` + misc) - rust-lang#124019 (Use raw-dylib for Windows synchronization functions) - rust-lang#124110 (Fix negating `f16` and `f128` constants) - rust-lang#124116 (when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#123752 - estebank:emoji-prefix, r=wesleywiser Properly handle emojis as literal prefix in macros Do not accept the following ```rust macro_rules! lexes {($($_:tt)*) => {}} lexes!(🐛"foo"); ``` Before, invalid emoji identifiers were gated during parsing instead of lexing in all cases, but this didn't account for macro pre-expansion of literal prefixes. Fix rust-lang#123696.
This bug is now fixed in stable rustc. See rust-lang/rust#123696 rust-lang/rust#123752
Do not accept the following
Before, invalid emoji identifiers were gated during parsing instead of lexing in all cases, but this didn't account for macro pre-expansion of literal prefixes.
Fix #123696.